import i18n from "@/locales";
/**
 * 内置角色数据
 */
export enum ROLEKEYS {
  'device' = 'device',
  'link' = 'link',
  'complex' = 'complex',
}

export type roleKeysType = keyof typeof ROLEKEYS;

export const RoleData = {
  [ROLEKEYS.device]: {
    name: i18n.global.t('data.RoleData.950813-0'),
    description: i18n.global.t('data.RoleData.950813-1'),
    groupId:'default_group',
    state: { text: i18n.global.t('data.RoleData.950813-2'), value: 'enabled' },
  },
  [ROLEKEYS.link]: {
    name: i18n.global.t('data.RoleData.950813-3'),
    groupId:'default_group',
    description: i18n.global.t('data.RoleData.950813-4'),
    state: { text: i18n.global.t('data.RoleData.950813-2'), value: 'enabled' },
  },
  [ROLEKEYS.complex]: {
    name: i18n.global.t('data.RoleData.950813-5'),
    groupId:'default_group',
    description: i18n.global.t('data.RoleData.950813-6'),
    state: { text: i18n.global.t('data.RoleData.950813-2'), value: 'enabled' },
  },
};

export default {
  [ROLEKEYS.device]: [
    {
      assetAccesses: [],
      code: "device/DashBoard",
      createTime: 1679906031144,
      granted: true,
      icon: "icon-keshihua",
      id: "68a02c9efa9fb4885c89b007f97d074d",
      level: 3,
      name: i18n.global.t('data.RoleData.950813-7'),
      owner: "iot",
      parentId: "b6327c3ff01b49c9a7a96101606dc27a",
      path: "WXaI-KCgA-gBU0",
      sortIndex: 1,
      url: "/iot/device/DashBoard",
    },
    {
      id: '1-3-2',
      parentId: '1-3',
      path: 'T4zX-b4q8-o7Jy',
      sortIndex: 2,
      level: 1,
      name: i18n.global.t('data.RoleData.950813-8'),
      code: 'device/Product',
      icon: 'icon-chanpin',
      url: '/iot/device/Product',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        {
          id: 'update',
          name: i18n.global.t('data.RoleData.950813-10'),
          enabled: true,
          granted: true,
        },
        { id: 'action', name: i18n.global.t('data.RoleData.950813-11'), enabled: true, granted: true },
        {
          id: 'export',
          name: i18n.global.t('data.RoleData.950813-12'),
          enabled: true,
          granted: true,
        },
        { id: 'import', name: i18n.global.t('data.RoleData.950813-13'), enabled: true, granted: true },
        {
          id: 'delete',
          name: i18n.global.t('data.RoleData.950813-14'),
          enabled: true,
          granted: true,
        },
        { id: 'add', name: i18n.global.t('data.RoleData.950813-15'), enabled: true, granted: true },
      ],
      accessSupport: { text: i18n.global.t('data.RoleData.950813-16'), value: 'support' },
      assetType: 'product',
      assetAccesses: [
        {
          supportId: 'ignore',
          name: i18n.global.t('data.RoleData.950813-17'),
          enabled: false,
          granted: false,
        },
        { supportId: 'creator', name: i18n.global.t('data.RoleData.950813-18'), enabled: true, granted: true },
        {
          supportId: 'org',
          name: i18n.global.t('data.RoleData.950813-19'),
          enabled: false,
          granted: false,
        },
        {
          supportId: 'org-include-children',
          name: i18n.global.t('data.RoleData.950813-20'),
          enabled: false,
          granted: false,
        },
      ],
      options: { switch: true },
      createTime: 1659344075524,
      accessDescription: i18n.global.t('data.RoleData.950813-21'),
      granted: true,
    },
    {
      id: '1-3-3',
      parentId: '1-3',
      path: 'T4zX-b4q8-xYd0',
      sortIndex: 3,
      level: 1,
      name: i18n.global.t('data.RoleData.950813-22'),
      code: 'device/Instance',
      icon: 'icon-shebei',
      url: '/iot/device/Instance',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        {
          id: 'export',
          name: i18n.global.t('data.RoleData.950813-12'),
          enabled: true,
          granted: true,
        },
        { id: 'import', name: i18n.global.t('data.RoleData.950813-13'), enabled: true, granted: true },
        {
          id: 'update',
          name: i18n.global.t('data.RoleData.950813-10'),
          enabled: true,
          granted: true,
        },
        { id: 'action', name: i18n.global.t('data.RoleData.950813-11'), enabled: true, granted: true },
        {
          id: 'delete',
          name: i18n.global.t('data.RoleData.950813-14'),
          enabled: true,
          granted: true,
        },
        { id: 'add', name: i18n.global.t('data.RoleData.950813-15'), enabled: true, granted: true },
        { id: 'remote', name: i18n.global.t('data.RoleData.950813-35'), enabled: true, granted: true },
      ],
      accessSupport: { text: i18n.global.t('data.RoleData.950813-16'), value: 'support' },
      assetType: 'device',
      assetAccesses: [
        {
          supportId: 'ignore',
          name: i18n.global.t('data.RoleData.950813-17'),
          enabled: false,
          granted: false,
        },
        { supportId: 'creator', name: i18n.global.t('data.RoleData.950813-18'), enabled: true, granted: true },
        {
          supportId: 'org',
          name: i18n.global.t('data.RoleData.950813-19'),
          enabled: false,
          granted: false,
        },
        {
          supportId: 'org-include-children',
          name: i18n.global.t('data.RoleData.950813-20'),
          enabled: false,
          granted: false,
        },
      ],
      options: { switch: true },
      createTime: 1659344075524,
      accessDescription: i18n.global.t('data.RoleData.950813-21'),
      granted: true,
    },
    {
      id: '1-3-4',
      parentId: '1-3',
      path: 'T4zX-b4q8-8ZFx',
      sortIndex: 4,
      level: 3,
      name: i18n.global.t('data.RoleData.950813-23'),
      code: 'device/Category',
      icon: 'icon-chanpinfenlei1',
      url: '/iot/device/Category',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        {
          id: 'delete',
          name: i18n.global.t('data.RoleData.950813-14'),
          enabled: true,
          granted: true,
        },
        { id: 'update', name: i18n.global.t('data.RoleData.950813-10'), enabled: true, granted: true },
        {
          id: 'add',
          name: i18n.global.t('data.RoleData.950813-15'),
          enabled: true,
          granted: true,
        },
      ],
      assetAccesses: [{
        supportId: 'ignore',
        name: i18n.global.t('data.RoleData.950813-17'),
        enabled: false,
        granted: false,
      },
      { supportId: 'creator', name: i18n.global.t('data.RoleData.950813-18'), enabled: true, granted: true },
      {
        supportId: 'org',
        name: i18n.global.t('data.RoleData.950813-19'),
        enabled: false,
        granted: false,
      },
      {
        supportId: 'org-include-children',
        name: i18n.global.t('data.RoleData.950813-20'),
        enabled: false,
        granted: false,
      },],
      options: { switch: true },
      createTime: 1659344075524,
      granted: true,
    },
  ],
  [ROLEKEYS.link]: [
    {
      assetAccesses: [],
      code: "link/DashBoard",
      createTime: 1679994088091,
      granted: true,
      icon: "icon-keshihua",
      id: "47bedff9df89ecc0f0ce896e53805f02",
      level: 3,
      name: i18n.global.t('data.RoleData.950813-7'),
      owner: "iot",
      parentId: "bd55cdc9d0c1700afe628f572f91c22e",
      path: "rmJT-eI2B-2yTR",
      sortIndex: 1,
      url: "/iot/link/dashboard",
    },
    {
      id: '1-4-2',
      parentId: '1-4',
      path: 'T4zX-A0TC-UlSD',
      sortIndex: 2,
      level: 3,
      name: i18n.global.t('data.RoleData.950813-24'),
      code: 'link/AccessConfig',
      icon: 'icon-wangguanzishebei',
      url: '/iot/link/accessConfig',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        {
          id: 'delete',
          name: i18n.global.t('data.RoleData.950813-14'),
          enabled: true,
          granted: true,
        },
        { id: 'action', name: i18n.global.t('data.RoleData.950813-11'), enabled: true, granted: true },
        {
          id: 'add',
          name: i18n.global.t('data.RoleData.950813-15'),
          enabled: true,
          granted: true,
        },
        { id: 'update', name: i18n.global.t('data.RoleData.950813-10'), enabled: true, granted: true },
      ],
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      granted: true,
    },
    {
      id: '1-4-3',
      parentId: '1-4',
      path: 'T4zX-A0TC-ctFm',
      sortIndex: 3,
      level: 3,
      name: i18n.global.t('data.RoleData.950813-25'),
      code: 'link/Protocol',
      icon: 'icon-tongzhiguanli',
      url: '/iot/link/protocol',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        { id: 'delete', name: i18n.global.t('data.RoleData.950813-14'), enabled: true, granted: true },
        {
          id: 'update',
          name: i18n.global.t('data.RoleData.950813-10'),
          enabled: true,
          granted: true,
        },
        { id: 'add', name: i18n.global.t('data.RoleData.950813-15'), enabled: true, granted: true },
      ],
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      granted: true,
    }, {
      assetAccesses: [],
      code: "Log",
      createTime: 1679994088091,
      granted: true,
      icon: "icon-rizhifuwu",
      id: "c340f8977e0d221da893715cab58ae8c",
      level: 3,
      name: i18n.global.t('data.RoleData.950813-26'),
      owner: "iot",
      parentId: "bd55cdc9d0c1700afe628f572f91c22e",
      path: "rmJT-eI2B-xH5Y",
      sortIndex: 1,
      url: "/iot/link/Log",
    },
    {
      id: '1-4-5',
      parentId: '1-4',
      path: 'T4zX-A0TC-fDic',
      sortIndex: 5,
      level: 3,
      name: i18n.global.t('data.RoleData.950813-27'),
      code: 'link/Type',
      icon: 'icon-wangluozujian',
      url: '/iot/link/type',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        {
          id: 'action',
          name: i18n.global.t('data.RoleData.950813-11'),
          enabled: true,
          granted: true,
        },
        { id: 'delete', name: i18n.global.t('data.RoleData.950813-14'), enabled: true, granted: true },
        {
          id: 'add',
          name: i18n.global.t('data.RoleData.950813-15'),
          enabled: true,
          granted: true,
        },
        { id: 'update', name: i18n.global.t('data.RoleData.950813-10'), enabled: true, granted: true },
      ],
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      granted: true,
    },
    {
      id: '1-4-6',
      parentId: '1-4',
      path: 'T4zX-A0TC-bBs5',
      sortIndex: 6,
      level: 3,
      name: i18n.global.t('data.RoleData.950813-28'),
      code: 'link/Certificate',
      icon: 'icon-rizhifuwu',
      url: '/iot/link/Certificate',
      buttons: [
        { id: 'delete', name: i18n.global.t('data.RoleData.950813-14'), enabled: true, granted: true },
        {
          id: 'update',
          name: i18n.global.t('data.RoleData.950813-10'),
          enabled: true,
          granted: true,
        },
        { id: 'add', name: i18n.global.t('data.RoleData.950813-15'), enabled: true, granted: true },
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
      ],
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      granted: true,
    },
    {
      id: '1-4-7',
      parentId: '1-4',
      path: 'T4zX-A0TC-VilV',
      sortIndex: 7,
      level: 3,
      name: i18n.global.t('data.RoleData.950813-29'),
      code: 'media/Stream',
      icon: 'icon-xuanzetongdao1',
      url: '/iot/link/Stream',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        {
          id: 'delete',
          name: i18n.global.t('data.RoleData.950813-14'),
          enabled: true,
          granted: true,
        },
        { id: 'update', name: i18n.global.t('data.RoleData.950813-10'), enabled: true, granted: true },
        {
          id: 'action',
          name: i18n.global.t('data.RoleData.950813-11'),
          enabled: true,
          granted: true,
        },
        {
          id: 'add',
          name: i18n.global.t('data.RoleData.950813-15'),
          enabled: true,
          granted: true,
        },
      ],
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      granted: true,
    },
    {
      id: '1-4-8-1',
      parentId: '1-4-8',
      path: 'T4zX-A0TC-GIE8-3Op3',
      sortIndex: 1,
      level: 4,
      name: 'OPC UA',
      code: 'link/Channel/Opcua',
      icon: 'icon-zhilianshebei',
      url: '/iot/link/Channel/Opcua',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        {
          id: 'action',
          name: i18n.global.t('data.RoleData.950813-11'),
          enabled: true,
          granted: true,
        },
        { id: 'update', name: i18n.global.t('data.RoleData.950813-10'), enabled: true, granted: true },
        {
          id: 'delete',
          name: i18n.global.t('data.RoleData.950813-14'),
          enabled: true,
          granted: true,
        },
        { id: 'add', name: i18n.global.t('data.RoleData.950813-15'), enabled: true, granted: true },
      ],
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      granted: true,
    },
    {
      id: '1-4-8-2',
      parentId: '1-4-8',
      path: 'T4zX-A0TC-GIE8-79SB',
      sortIndex: 2,
      level: 4,
      name: 'Modbus',
      code: 'link/Channel/Modbus',
      icon: 'icon-changjingliandong',
      url: '/iot/link/Channel/Modbus',
      buttons: [
        { id: 'update', name: i18n.global.t('data.RoleData.950813-10'), enabled: true, granted: true },
        {
          id: 'action',
          name: i18n.global.t('data.RoleData.950813-11'),
          enabled: true,
          granted: true,
        },
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        {
          id: 'delete',
          name: i18n.global.t('data.RoleData.950813-14'),
          enabled: true,
          granted: true,
        },
        { id: 'add', name: i18n.global.t('data.RoleData.950813-15'), enabled: true, granted: true },
      ],
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      granted: true,
    },
    {
      id: '1-4-9',
      parentId: '1-4',
      path: 'T4zX-A0TC-BFum',
      sortIndex: 9998,
      level: 1,
      name: i18n.global.t('data.RoleData.950813-30'),
      code: 'device/Firmware',
      icon: 'icon-wangluozujian',
      url: '/iot/link/firmware',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        { id: 'update', name: i18n.global.t('data.RoleData.950813-10'), enabled: true, granted: true },
        { id: 'delete', name: i18n.global.t('data.RoleData.950813-14'), enabled: true, granted: true },
        {
          id: 'add',
          name: i18n.global.t('data.RoleData.950813-15'),
          enabled: true,
          granted: true,
        },
      ],
      accessSupport: { text: i18n.global.t('data.RoleData.950813-31'), value: 'unsupported' },
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      accessDescription: i18n.global.t('data.RoleData.950813-32'),
      granted: true,
    },
    {
      id: '1-4-10',
      parentId: '1-4',
      path: 'T4zX-A0TC-BFum',
      sortIndex: 9999,
      level: 1,
      name: i18n.global.t('data.RoleData.950813-33'),
      code: 'link/plugin',
      icon: 'BoxPlotOutlined',
      url: '/iot/link/plugin',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        { id: 'update', name: i18n.global.t('data.RoleData.950813-10'), enabled: true, granted: true },
        { id: 'delete', name: i18n.global.t('data.RoleData.950813-14'), enabled: true, granted: true },
        {
          id: 'add',
          name: i18n.global.t('data.RoleData.950813-15'),
          enabled: true,
          granted: true,
        },
      ],
      accessSupport: { text: i18n.global.t('data.RoleData.950813-31'), value: 'unsupported' },
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      accessDescription: i18n.global.t('data.RoleData.950813-32'),
      granted: true,
    },
    {
      id: '1-4-11',
      parentId: '1-4',
      path: '1ugw-88dk-5bUv',
      sortIndex: 11,
      level: 3,
      name: i18n.global.t('data.RoleData.950813-34'),
      code: 'resource/Resource',
      icon: 'SnippetsOutlined',
      url: '/iot/link/resource',
      buttons: [],
      accessSupport: { text: i18n.global.t('data.RoleData.950813-31'), value: 'unsupported' },
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      accessDescription: i18n.global.t('data.RoleData.950813-32'),
      granted: true,
    },
  ],
  [ROLEKEYS.complex]: [
    {
      assetAccesses: [],
      code: "device/DashBoard",
      createTime: 1679906031144,
      granted: true,
      icon: "icon-keshihua",
      id: "68a02c9efa9fb4885c89b007f97d074d",
      level: 3,
      name: i18n.global.t('data.RoleData.950813-7'),
      owner: "iot",
      parentId: "b6327c3ff01b49c9a7a96101606dc27a",
      path: "WXaI-KCgA-gBU0",
      sortIndex: 1,
      url: "/iot/device/DashBoard",
    },
    {
      id: '1-3-2',
      parentId: '1-3',
      path: 'T4zX-b4q8-o7Jy',
      sortIndex: 2,
      level: 1,
      name: i18n.global.t('data.RoleData.950813-8'),
      code: 'device/Product',
      icon: 'icon-chanpin',
      url: '/iot/device/Product',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        {
          id: 'update',
          name: i18n.global.t('data.RoleData.950813-10'),
          enabled: true,
          granted: true,
        },
        { id: 'action', name: i18n.global.t('data.RoleData.950813-11'), enabled: true, granted: true },
        {
          id: 'export',
          name: i18n.global.t('data.RoleData.950813-12'),
          enabled: true,
          granted: true,
        },
        { id: 'import', name: i18n.global.t('data.RoleData.950813-13'), enabled: true, granted: true },
        {
          id: 'delete',
          name: i18n.global.t('data.RoleData.950813-14'),
          enabled: true,
          granted: true,
        },
        { id: 'add', name: i18n.global.t('data.RoleData.950813-15'), enabled: true, granted: true },
      ],
      accessSupport: { text: i18n.global.t('data.RoleData.950813-16'), value: 'support' },
      assetType: 'product',
      assetAccesses: [
        {
          supportId: 'ignore',
          name: i18n.global.t('data.RoleData.950813-17'),
          enabled: false,
          granted: false,
        },
        { supportId: 'creator', name: i18n.global.t('data.RoleData.950813-18'), enabled: true, granted: true },
        {
          supportId: 'org',
          name: i18n.global.t('data.RoleData.950813-19'),
          enabled: false,
          granted: false,
        },
        {
          supportId: 'org-include-children',
          name: i18n.global.t('data.RoleData.950813-20'),
          enabled: false,
          granted: false,
        },
      ],
      options: { switch: true },
      createTime: 1659344075524,
      accessDescription: i18n.global.t('data.RoleData.950813-21'),
      granted: true,
    },
    {
      id: '1-3-3',
      parentId: '1-3',
      path: 'T4zX-b4q8-xYd0',
      sortIndex: 3,
      level: 1,
      name: i18n.global.t('data.RoleData.950813-22'),
      code: 'device/Instance',
      icon: 'icon-shebei',
      url: '/iot/device/Instance',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        {
          id: 'export',
          name: i18n.global.t('data.RoleData.950813-12'),
          enabled: true,
          granted: true,
        },
        { id: 'import', name: i18n.global.t('data.RoleData.950813-13'), enabled: true, granted: true },
        {
          id: 'update',
          name: i18n.global.t('data.RoleData.950813-10'),
          enabled: true,
          granted: true,
        },
        { id: 'action', name: i18n.global.t('data.RoleData.950813-11'), enabled: true, granted: true },
        {
          id: 'delete',
          name: i18n.global.t('data.RoleData.950813-14'),
          enabled: true,
          granted: true,
        },
        { id: 'add', name: i18n.global.t('data.RoleData.950813-15'), enabled: true, granted: true },
        { id: 'remote', name: i18n.global.t('data.RoleData.950813-35'), enabled: true, granted: true },
      ],
      accessSupport: { text: i18n.global.t('data.RoleData.950813-16'), value: 'support' },
      assetType: 'device',
      assetAccesses: [
        {
          supportId: 'ignore',
          name: i18n.global.t('data.RoleData.950813-17'),
          enabled: false,
          granted: false,
        },
        { supportId: 'creator', name: i18n.global.t('data.RoleData.950813-18'), enabled: true, granted: true },
        {
          supportId: 'org',
          name: i18n.global.t('data.RoleData.950813-19'),
          enabled: false,
          granted: false,
        },
        {
          supportId: 'org-include-children',
          name: i18n.global.t('data.RoleData.950813-20'),
          enabled: false,
          granted: false,
        },
      ],
      options: { switch: true },
      createTime: 1659344075524,
      accessDescription: i18n.global.t('data.RoleData.950813-21'),
      granted: true,
    },
    {
      id: '1-3-4',
      parentId: '1-3',
      path: 'T4zX-b4q8-8ZFx',
      sortIndex: 4,
      level: 3,
      name: i18n.global.t('data.RoleData.950813-23'),
      code: 'device/Category',
      icon: 'icon-chanpinfenlei1',
      url: '/iot/device/Category',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        {
          id: 'delete',
          name: i18n.global.t('data.RoleData.950813-14'),
          enabled: true,
          granted: true,
        },
        { id: 'update', name: i18n.global.t('data.RoleData.950813-10'), enabled: true, granted: true },
        {
          id: 'add',
          name: i18n.global.t('data.RoleData.950813-15'),
          enabled: true,
          granted: true,
        },
      ],
      assetAccesses: [{
        supportId: 'ignore',
        name: i18n.global.t('data.RoleData.950813-17'),
        enabled: false,
        granted: false,
      },
      { supportId: 'creator', name: i18n.global.t('data.RoleData.950813-18'), enabled: true, granted: true },
      {
        supportId: 'org',
        name: i18n.global.t('data.RoleData.950813-19'),
        enabled: false,
        granted: false,
      },
      {
        supportId: 'org-include-children',
        name: i18n.global.t('data.RoleData.950813-20'),
        enabled: false,
        granted: false,
      }],
      options: { switch: true },
      createTime: 1659344075524,
      granted: true,
    },
    {
      assetAccesses: [],
      code: "link/DashBoard",
      createTime: 1679994088091,
      granted: true,
      icon: "icon-keshihua",
      id: "47bedff9df89ecc0f0ce896e53805f02",
      level: 3,
      name: i18n.global.t('data.RoleData.950813-7'),
      owner: "iot",
      parentId: "bd55cdc9d0c1700afe628f572f91c22e",
      path: "rmJT-eI2B-2yTR",
      sortIndex: 1,
      url: "/iot/link/dashboard",
    },
    {
      id: '1-4-2',
      parentId: '1-4',
      path: 'T4zX-A0TC-UlSD',
      sortIndex: 2,
      level: 3,
      name: i18n.global.t('data.RoleData.950813-24'),
      code: 'link/AccessConfig',
      icon: 'icon-wangguanzishebei',
      url: '/iot/link/accessConfig',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        {
          id: 'delete',
          name: i18n.global.t('data.RoleData.950813-14'),
          enabled: true,
          granted: true,
        },
        { id: 'action', name: i18n.global.t('data.RoleData.950813-11'), enabled: true, granted: true },
        {
          id: 'add',
          name: i18n.global.t('data.RoleData.950813-15'),
          enabled: true,
          granted: true,
        },
        { id: 'update', name: i18n.global.t('data.RoleData.950813-10'), enabled: true, granted: true },
      ],
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      granted: true,
    },
    {
      id: '1-4-3',
      parentId: '1-4',
      path: 'T4zX-A0TC-ctFm',
      sortIndex: 3,
      level: 3,
      name: i18n.global.t('data.RoleData.950813-25'),
      code: 'link/Protocol',
      icon: 'icon-tongzhiguanli',
      url: '/iot/link/protocol',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        { id: 'delete', name: i18n.global.t('data.RoleData.950813-14'), enabled: true, granted: true },
        {
          id: 'update',
          name: i18n.global.t('data.RoleData.950813-10'),
          enabled: true,
          granted: true,
        },
        { id: 'add', name: i18n.global.t('data.RoleData.950813-15'), enabled: true, granted: true },
      ],
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      granted: true,
    },
    {
      assetAccesses: [],
      code: "Log",
      createTime: 1679994088091,
      granted: true,
      icon: "icon-rizhifuwu",
      id: "c340f8977e0d221da893715cab58ae8c",
      level: 3,
      name: i18n.global.t('data.RoleData.950813-26'),
      owner: "iot",
      parentId: "bd55cdc9d0c1700afe628f572f91c22e",
      path: "rmJT-eI2B-xH5Y",
      sortIndex: 1,
      url: "/iot/link/Log",
    },
    {
      id: '1-4-5',
      parentId: '1-4',
      path: 'T4zX-A0TC-fDic',
      sortIndex: 5,
      level: 3,
      name: i18n.global.t('data.RoleData.950813-27'),
      code: 'link/Type',
      icon: 'icon-wangluozujian',
      url: '/iot/link/type',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        {
          id: 'action',
          name: i18n.global.t('data.RoleData.950813-11'),
          enabled: true,
          granted: true,
        },
        { id: 'delete', name: i18n.global.t('data.RoleData.950813-14'), enabled: true, granted: true },
        {
          id: 'add',
          name: i18n.global.t('data.RoleData.950813-15'),
          enabled: true,
          granted: true,
        },
        { id: 'update', name: i18n.global.t('data.RoleData.950813-10'), enabled: true, granted: true },
      ],
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      granted: true,
    },
    {
      id: '1-4-6',
      parentId: '1-4',
      path: 'T4zX-A0TC-bBs5',
      sortIndex: 6,
      level: 3,
      name: i18n.global.t('data.RoleData.950813-28'),
      code: 'link/Certificate',
      icon: 'icon-rizhifuwu',
      url: '/iot/link/Certificate',
      buttons: [
        { id: 'delete', name: i18n.global.t('data.RoleData.950813-14'), enabled: true, granted: true },
        {
          id: 'update',
          name: i18n.global.t('data.RoleData.950813-10'),
          enabled: true,
          granted: true,
        },
        { id: 'add', name: i18n.global.t('data.RoleData.950813-15'), enabled: true, granted: true },
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
      ],
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      granted: true,
    },
    {
      id: '1-4-7',
      parentId: '1-4',
      path: 'T4zX-A0TC-VilV',
      sortIndex: 7,
      level: 3,
      name: i18n.global.t('data.RoleData.950813-29'),
      code: 'media/Stream',
      icon: 'icon-xuanzetongdao1',
      url: '/iot/link/Stream',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        {
          id: 'delete',
          name: i18n.global.t('data.RoleData.950813-14'),
          enabled: true,
          granted: true,
        },
        { id: 'update', name: i18n.global.t('data.RoleData.950813-10'), enabled: true, granted: true },
        {
          id: 'action',
          name: i18n.global.t('data.RoleData.950813-11'),
          enabled: true,
          granted: true,
        },
        {
          id: 'add',
          name: i18n.global.t('data.RoleData.950813-15'),
          enabled: true,
          granted: true,
        },
      ],
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      granted: true,
    },
    {
      id: '1-4-8-1',
      parentId: '1-4-8',
      path: 'T4zX-A0TC-GIE8-3Op3',
      sortIndex: 1,
      level: 4,
      name: 'OPC UA',
      code: 'link/Channel/Opcua',
      icon: 'icon-zhilianshebei',
      url: '/iot/link/Channel/Opcua',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        {
          id: 'action',
          name: i18n.global.t('data.RoleData.950813-11'),
          enabled: true,
          granted: true,
        },
        { id: 'update', name: i18n.global.t('data.RoleData.950813-10'), enabled: true, granted: true },
        {
          id: 'delete',
          name: i18n.global.t('data.RoleData.950813-14'),
          enabled: true,
          granted: true,
        },
        { id: 'add', name: i18n.global.t('data.RoleData.950813-15'), enabled: true, granted: true },
      ],
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      granted: true,
    },
    {
      id: '1-4-8-2',
      parentId: '1-4-8',
      path: 'T4zX-A0TC-GIE8-79SB',
      sortIndex: 2,
      level: 4,
      name: 'Modbus',
      code: 'link/Channel/Modbus',
      icon: 'icon-changjingliandong',
      url: '/iot/link/Channel/Modbus',
      buttons: [
        { id: 'update', name: i18n.global.t('data.RoleData.950813-10'), enabled: true, granted: true },
        {
          id: 'action',
          name: i18n.global.t('data.RoleData.950813-11'),
          enabled: true,
          granted: true,
        },
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        {
          id: 'delete',
          name: i18n.global.t('data.RoleData.950813-14'),
          enabled: true,
          granted: true,
        },
        { id: 'add', name: i18n.global.t('data.RoleData.950813-15'), enabled: true, granted: true },
      ],
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      granted: true,
    },
    {
      id: '1-4-9',
      parentId: '1-4',
      path: 'T4zX-A0TC-BFum',
      sortIndex: 9999,
      level: 1,
      name: i18n.global.t('data.RoleData.950813-30'),
      code: 'device/Firmware',
      icon: 'icon-wangluozujian',
      url: '/iot/link/firmware',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        { id: 'update', name: i18n.global.t('data.RoleData.950813-10'), enabled: true, granted: true },
        { id: 'delete', name: i18n.global.t('data.RoleData.950813-14'), enabled: true, granted: true },
        {
          id: 'add',
          name: i18n.global.t('data.RoleData.950813-15'),
          enabled: true,
          granted: true,
        },
      ],
      accessSupport: { text: i18n.global.t('data.RoleData.950813-31'), value: 'unsupported' },
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      accessDescription: i18n.global.t('data.RoleData.950813-32'),
      granted: true,
    },
    {
      id: '1-4-10',
      parentId: '1-4',
      path: 'T4zX-A0TC-BFum',
      sortIndex: 9999,
      level: 1,
      name: i18n.global.t('data.RoleData.950813-33'),
      code: 'link/plugin',
      icon: 'BoxPlotOutlined',
      url: '/iot/link/plugin',
      buttons: [
        { id: 'view', name: i18n.global.t('data.RoleData.950813-9'), enabled: true, granted: true },
        { id: 'update', name: i18n.global.t('data.RoleData.950813-10'), enabled: true, granted: true },
        { id: 'delete', name: i18n.global.t('data.RoleData.950813-14'), enabled: true, granted: true },
        {
          id: 'add',
          name: i18n.global.t('data.RoleData.950813-15'),
          enabled: true,
          granted: true,
        },
      ],
      accessSupport: { text: i18n.global.t('data.RoleData.950813-31'), value: 'unsupported' },
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      accessDescription: i18n.global.t('data.RoleData.950813-32'),
      granted: true,
    },
    {
      id: '1-4-11',
      parentId: '1-4',
      path: '1ugw-88dk-5bUv',
      sortIndex: 11,
      level: 3,
      name: i18n.global.t('data.RoleData.950813-34'),
      code: 'resource/Resource',
      icon: 'SnippetsOutlined',
      url: '/iot/link/resource',
      buttons: [],
      accessSupport: { text: i18n.global.t('data.RoleData.950813-31'), value: 'unsupported' },
      assetAccesses: [],
      options: {},
      createTime: 1659344075524,
      accessDescription: i18n.global.t('data.RoleData.950813-32'),
      granted: true,
    },
  ],
};
